package com.lonelymeko.maven.aimodeltest.controller;

import com.lonelymeko.maven.aimodeltest.helloWorld.DeepSeekChat;
import com.lonelymeko.maven.aimodeltest.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
@RequestMapping("/user")
@CrossOrigin
public class TaskController {
    @Autowired
    DeepSeekChat deepSeekChat;
    @PostMapping("/talk")
    private Result<String> talk(@RequestParam String userContent) {
        String result = deepSeekChat.chat(userContent);
        return Result.success(result);


    }


}
